﻿@model blacksoft.Models.Producto
@using blacksoft.Helpers

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutCompras.cshtml";
}



<div class="block big">
    <div class="titlebar">
        <h3>Modificar Producto</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="form">
                @Html.ValidationSummary(true)
                @Html.HiddenFor(model => model.IDProducto)

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Nombre)
                    @Html.EditorFor(model => model.Nombre)
                    @Html.ValidationMessageFor(model => model.Nombre)

                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Descripcion)
                    @Html.EditorFor(model => model.Descripcion)
                    @Html.ValidationMessageFor(model => model.Descripcion)

                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.UnidadMedida)
                    @Html.EditorFor(model => model.UnidadMedida)
                    @Html.ValidationMessageFor(model => model.UnidadMedida)

                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Estado)
                    @Html.TextBoxFor(model => model.Estado, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.Estado)
                    @Html.ValidationMessageFor(model => model.Estado)

                </div>
                <div class="form-row">
                    @Html.LabelFor(model => model.EnViaje, new { @class = "control-label col-md-2" })
                    @Html.EditorFor(model => model.EnViaje)
                    @Html.ValidationMessageFor(model => model.EnViaje)

                </div>
                <br />

                <div class="form-group">
                        <input type="submit" value="Guardar" class="btn btn-default" />
                        <br />
                        @Html.ActionLink("Regresar al listado", "Index")
                    </div>
                </div>        
        }
    </div>
</div>
        
